package com.example.lawyermanager.dangao.service;

import com.example.lawyermanager.dangao.entity.Lawyer;
import com.example.lawyermanager.dangao.mapper.LawyerMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.ui.Model;

import java.util.List;

/**
 * @author 86134
 * @version 1.0
 */
@Service
public class LawyerServiceImpl implements LawyerService {
    @Autowired
    LawyerMapper lawyerMapper;

    @Override
    public int updataLawyer(Lawyer lawyer) {
        return lawyerMapper.updataLawyer(lawyer);
    }

    @Override
    public Lawyer findLawyer(int lawyerid) {
        return lawyerMapper.findLawyer(lawyerid);
    }

    @Override
    public int removeLawyer(int lawyerid) {
        return lawyerMapper.deleteLawyer(lawyerid);
    }

    @Override
    public List<Lawyer> findLawyer() {
        return lawyerMapper.selectLawyer();
    }

    @Override
    public int addLawyer(Lawyer lawyer) {
        return lawyerMapper.insertLawyer(lawyer);
    }
}
